﻿using Hxj.Data;
using Hxj.Data.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace RecruitStudents.Utility.Model
{
    /// <summary>
	/// 实体类TB_Examinee_ExamGroup 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
    public class TB_Examinee_ExamGroup : Entity
    {
        public TB_Examinee_ExamGroup() : base("TB_Examinee_ExamGroup")
        {
            _ExamGroupID = Guid.NewGuid().ToString();
            _CreateDate = DateTime.Now;
        }

        #region Model
        private string _ExamGroupID;
        private string _AllowExamID;
        private string _GroupTime;
        private string _SpecialityKindsNO;
        private DateTime? _CreateDate;
        /// <summary>
        /// 
        /// </summary>
        public string ExamGroupID
        {
            get { return _ExamGroupID; }
            set
            {
                this.OnPropertyValueChange(_.ExamGroupID, _ExamGroupID, value);
                this._ExamGroupID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string AllowExamID
        {
            get { return _AllowExamID; }
            set
            {
                this.OnPropertyValueChange(_.AllowExamID, _AllowExamID, value);
                this._AllowExamID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string GroupTime
        {
            get { return _GroupTime; }
            set
            {
                this.OnPropertyValueChange(_.GroupTime, _GroupTime, value);
                this._GroupTime = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string SpecialityKindsNO
        {
            get { return _SpecialityKindsNO; }
            set
            {
                this.OnPropertyValueChange(_.SpecialityKindsNO, _SpecialityKindsNO, value);
                this._SpecialityKindsNO = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? CreateDate
        {
            get { return _CreateDate; }
            set
            {
                this.OnPropertyValueChange(_.CreateDate, _CreateDate, value);
                this._CreateDate = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
                _.ExamGroupID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
                _.ExamGroupID,
                _.AllowExamID,
                _.GroupTime,
                _.SpecialityKindsNO,
                _.CreateDate};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
                this._ExamGroupID,
                this._AllowExamID,
                this._GroupTime,
                this._SpecialityKindsNO,
                this._CreateDate};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ExamGroupID = DataUtils.ConvertValue<string>(reader["ExamGroupID"]);
            this._AllowExamID = DataUtils.ConvertValue<string>(reader["AllowExamID"]);
            this._GroupTime = DataUtils.ConvertValue<string>(reader["GroupTime"]);
            this._SpecialityKindsNO = DataUtils.ConvertValue<string>(reader["SpecialityKindsNO"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(reader["CreateDate"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ExamGroupID = DataUtils.ConvertValue<string>(row["ExamGroupID"]);
            this._AllowExamID = DataUtils.ConvertValue<string>(row["AllowExamID"]);
            this._GroupTime = DataUtils.ConvertValue<string>(row["GroupTime"]);
            this._SpecialityKindsNO = DataUtils.ConvertValue<string>(row["SpecialityKindsNO"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(row["CreateDate"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Examinee_ExamGroup");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ExamGroupID = new Field("ExamGroupID", "TB_Examinee_ExamGroup", "ExamGroupID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field AllowExamID = new Field("AllowExamID", "TB_Examinee_ExamGroup", "AllowExamID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field GroupTime = new Field("GroupTime", "TB_Examinee_ExamGroup", "GroupTime");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field SpecialityKindsNO = new Field("SpecialityKindsNO", "TB_Examinee_ExamGroup", "SpecialityKindsNO");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field CreateDate = new Field("CreateDate", "TB_Examinee_ExamGroup", "CreateDate");
        }
        #endregion


    }
}

